//
//  HttpNetworkManager.h
//  Maylida
//
//  Created by Laojingxing on 2018/4/16.
//  Copyright © 2018年 laojingxing. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

typedef void(^SuccessBlock)(id task, id responseObject);
typedef void(^FailureBlock)(id task, NSError *error);

#define kTimeoutInterval 15
#define kHTTPManager [HttpNetworkManager sharedHttpNetworkManager]

@interface HttpNetworkManager : NSObject

/**
 请求管理者
 */
@property (nonatomic, strong) AFHTTPSessionManager *requestManager;

/**
 所有请求对象
 */
@property (nonatomic, strong) NSMutableArray<NSURLSessionDataTask *> *allTaskArray;
//DEFINE_SINGLETON_HEADER
DEFINE_SINGLETON_HEADER(HttpNetworkManager);
- (void)postRequestWithUrl:(NSString *)urlString parameters:(NSDictionary *)parameters successBlock:(SuccessBlock)successBlock failureBlock:(FailureBlock)failureBlock;
@end
